﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NUnit.Framework;

namespace Web.Tests
{
    [TestFixture]
    public class TestGord
    {
        [Test]
        public void IfNullPlusStringThenNull()
        {
            string result = null + "some string";

            Assert.AreEqual("some string", result);
        }
        
        [Test]
        public void IfEqualStringCompareThenReturn()
        {
            // arrange

            // act
            int result = string.Compare("blabla","blabla");
            
            // assert
            Assert.AreEqual(0, result);
        }

        [Test]
        public void IfEqualStringCompareThenReturnMinusOne()
        {
            int result = string.Compare("bla", "blabla");

            Assert.AreEqual(-1, result);
        }

        [Test]
        public void IfEqualStringCompareThenReturnMinusOneVerTwo()
        {
            int result = string.Compare("blabla", "ololo");

            Assert.AreEqual(-1, result);
        }

        [Test]
        public void IfEqualStringCopy()
        {
            string result = string.Copy("blabla");

            Assert.AreEqual("blabla", result);
        }

        [Test]
        public void IfEqualStringConcat()
        {
            string result = string.Concat("blabla" + "ololo");

            Assert.AreEqual("blablaololo", result);
        }

        [Test]
        public void IsEmpty()
        {
            Assert.AreEqual("", string.Empty);
        }

        [Test]
        public void StringLength()
        {
            int result = "blalba".Length;
            Assert.AreEqual(6, result);
        }

        [Test]
        public void IsNormalized()
        {
            Assert.True("sdf".IsNormalized());
        }
    }
}
